// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui' //element-ui的全部组件
import 'element-ui/lib/theme-chalk/index.css'//element-ui的css
import axios from 'axios'
import VueI18n from 'vue-i18n' //中英文切换
import yema from "./components/admin/yema/yema.vue"  //页码
import echarts from 'echarts'
import Vuex from 'vuex';
import store from "../static/store.js"

Vue.prototype.$axios = axios // 将请求模块挂载到实例模型上
Vue.use(ElementUI) //使用elementUI
Vue.config.productionTip = false
Vue.use(VueI18n)
Vue.prototype.$echarts = echarts

// //中英文切换
const i18n=new VueI18n({
  locale:localStorage.getItem('languageSet')||'zh-CN',   //从localStorage里获取用户中英文选择，没有则默认中文
  messages:{
    'zh-CN':require('./components/lang/zh-CN.js'),
    'zh-TW':require('./components/lang/zh-TW.js'),
    'en-US':require('./components/lang/en-US.js'),
  },
  silentTranslationWarn: true  //去掉警告
})

//设置IP地址
// Vue.prototype.API = "http://222.202.179.12:9527";
Vue.prototype.API = "http://itech.oicp.vip:47702";
// Vue.prototype.API = "http://192.168.43.243:9527";

//全局组件
Vue.component("yema",yema);

/* eslint-disable no-new */
new Vue({
  router,
  store,
  i18n,
  render: h => h(App),
}).$mount('#app')
